A render queue, where all items that have to be rendered are queued.
More...
A render queue, where all items that have to be rendered are queued.
A queue can allocate entities to render. The entities can be used as-is, or attached to a Node, using Entity::setParentNode(). When an object is attached to the graph, it enables it to work with the transformations from the nodes.
◆ getAccelerationStructureBuffer()
virtual Buffer* nkGraphics::RenderQueue::getAccelerationStructureBuffer |
( |
| ) |
const |
|
virtual |
Retrieves the acceleration structure's buffer. This buffer can be fed to shaders for raytracing. If raytracing is not supported, this buffer will be empty.
- Returns
- The acceleration structure's buffer used.
◆ getHidden()
bool nkGraphics::RenderQueue::getHidden |
( |
| ) |
const |
- Returns
- Whether the render queue is hidden from project exporting (true) or not (false).
◆ setHidden()
void nkGraphics::RenderQueue::setHidden |
( |
bool |
value | ) |
|
Sets whether the render queue should be hidden from the project exporting functions.
- Parameters
-
value | If it should be hidden (true) or not (false). |
◆ addEntity()
virtual Entity* nkGraphics::RenderQueue::addEntity |
( |
| ) |
|
|
virtual |
Adds an entity into the queue.
- Returns
- The entity allocated and added to the queue.
◆ eraseEntity()
virtual void nkGraphics::RenderQueue::eraseEntity |
( |
Entity * |
ent | ) |
|
|
virtual |
Erases and frees the memory of an entity.
- Parameters
-
◆ clearQueue()
virtual void nkGraphics::RenderQueue::clearQueue |
( |
| ) |
|
|
virtual |
Clears the queue and makes it empty again.
◆ getEntityCount()
unsigned int nkGraphics::RenderQueue::getEntityCount |
( |
| ) |
const |
- Returns
- The number of entities currently in the queue.
◆ getEntity()
Entity* nkGraphics::RenderQueue::getEntity |
( |
unsigned int |
index | ) |
const |
- Parameters
-
index | The index of the entity to retrieve. |
- Returns
- The entity requested if available, nullptr else.
◆ getRenderableCount()
unsigned int nkGraphics::RenderQueue::getRenderableCount |
( |
| ) |
const |
- Returns
- The total number of renderable enqueued for visualization. This number counts all sub entities within the queue's entities.
◆ updateEntityNode()
virtual void nkGraphics::RenderQueue::updateEntityNode |
( |
Entity * |
ent | ) |
|
|
virtual |
Updates called from registered objects. In theory, external code should not use it.
- Parameters
-
◆ updateAddMesh()
virtual void nkGraphics::RenderQueue::updateAddMesh |
( |
SubEntity * |
subEnt | ) |
|
|
virtual |
Update called from registered object. In theory, external code should not use it.
- Parameters
-
◆ updateDeleteMesh()
virtual void nkGraphics::RenderQueue::updateDeleteMesh |
( |
SubEntity * |
subEnt | ) |
|
|
virtual |
Update called from registered object. In theory, external code should not use it.
- Parameters
-
◆ updateSwapMesh()
virtual void nkGraphics::RenderQueue::updateSwapMesh |
( |
SubEntity * |
subEnt | ) |
|
|
virtual |
Update called from registered object. In theory, external code should not use it.
- Parameters
-
◆ updateSwapShader()
virtual void nkGraphics::RenderQueue::updateSwapShader |
( |
Entity * |
ent | ) |
|
|
virtual |
Update called from registered object. In theory, external code should not use it.
- Parameters
-
◆ updateSwapShaderRaytracing()
virtual void nkGraphics::RenderQueue::updateSwapShaderRaytracing |
( |
Entity * |
ent, |
|
|
Shader * |
oldShader, |
|
|
Shader * |
newShader |
|
) |
| |
|
virtual |
Update called from registered object. In theory, external code should not use it.
- Parameters
-
ent | The caller. |
oldShader | The shader assigned before. |
newShader | The shader to reassign. |
◆ appendQueue()
void nkGraphics::RenderQueue::appendQueue |
( |
RenderQueue * |
other | ) |
|
Appends another queue. Used when computing the render queue in the RenderQueueManager. This kind of API will change soon, it is best left untouched by external code.
- Parameters
-
other | The queue to append. |
◆ setName()
virtual void nkGraphics::RenderQueue::setName |
( |
const std::string_view & |
name | ) |
|
|
virtual |
◆ getName()
std::string_view nkGraphics::RenderQueue::getName |
( |
| ) |
const |
- Returns
- The name assigned.
◆ setIndex()
void nkGraphics::RenderQueue::setIndex |
( |
unsigned int |
index | ) |
|
◆ getIndex()
unsigned int nkGraphics::RenderQueue::getIndex |
( |
| ) |
const |
- Returns
- The index assigned.
◆ setRenderingQueue()
void nkGraphics::RenderQueue::setRenderingQueue |
( |
bool |
value | ) |
|
Sets whether the queue is a rendering queue. Rendering queues are queues meant to be prepared to render, and are not populated from usual calls. This API is part of the rendering queue computing and will change soon. It is best left untouched by external code.
- Parameters
-
value | If the queue is a rendering one (true) or not (false). |
◆ getRenderQueue()
bool nkGraphics::RenderQueue::getRenderQueue |
( |
| ) |
const |
- Returns
- Whether the queue is made for rendering (true) or not (false).
◆ setRaytraced()
virtual void nkGraphics::RenderQueue::setRaytraced |
( |
bool |
value | ) |
|
|
virtual |
Sets whether this queue should be raytraced. Raytraced queues will keep their acceleration structures updated as they change. Enable this only when needed.
- Parameters
-
value | If the queue should be raytraced (true) or not (false). |
◆ getRaytraced()
bool nkGraphics::RenderQueue::getRaytraced |
( |
| ) |
const |
- Returns
- Whether the queue is marked as raytraced (true) or not (false).
◆ exportClassToTree()
virtual void nkGraphics::RenderQueue::exportClassToTree |
( |
nkExport::Node * |
rootNode | ) |
|
|
overridevirtual |
Basic exporting capabilities.
- Parameters
-
rootNode | The tree to export to. |
Implements nkExport::Exportable.
◆ importClassFromTree()
virtual void nkGraphics::RenderQueue::importClassFromTree |
( |
nkExport::Node * |
rootNode | ) |
|
|
overridevirtual |
Basic importing capabilities.
- Parameters
-
rootNode | The tree to import from. |
Implements nkExport::Exportable.
The documentation for this class was generated from the following file: